import * as bm from "/js/baseModule.js";

export class Module extends bm.baseModule {
    constructor(view) {
        super(view);
        let that = this;
        new Vue({
            el: '.FeedbackResult_vue',
            data: {
                current_demand: globalData.current_demand,
                // point: that.point
            },
            computed: {
                oneDay: function () {
                    let startTime = globalData.current_demand.bid_win_at;
                    let stime = startTime * 1000;
                    let date = new Date().getTime();
                    let gapMin = Math.floor((date - stime) / 1000 / 60);
                    if (gapMin <= 0) {
                        //防止偶尔出现的js取时间不准确
                        gapMin = 1;
                    }

                    if (gapMin > (60 * 24)) {
                        return false;
                    }
                    return true;
                },
            }
        });
    }
    /**查看该项目 */
    _evt_projectDetail() {
        let pro_info = globalData.current_demand;
        if (pro_info) {
            globalData.current_demand = pro_info;
            location.hash = 'demand?did='+ pro_info.id;
        }
    }

}
